-- /usr/lib/lua/tianku/apps/controllers/user.lua
local Controller = require("tianku.core.Controller")

local _M = Controller:new()

-- 模拟用户数据
local mock_users = {
    {
        id = "test1",
        name = "测试用户1",
        email = "test1@example.com"
    },
    {
        id = "test2",
        name = "测试用户2",
        email = "test2@example.com"
    }
}

function _M:index()
    self:json(mock_users)
end
function _M:create()
    -- 创建用户逻辑
end
function _M:show()
    local user = mock_users[1]  -- 始终返回第一个测试用户
    self:json(user)
end

return _M

